package com.system.demo.controller.mainPage;


import cn.dev33.satoken.annotation.SaCheckLogin;
import com.system.demo.service.MainPage.MailPageService;
import com.system.demo.tool.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/home")
@SaCheckLogin
public class MainPageController {

    @Autowired
    private MailPageService mailPageService;


    //获取轮播图
    @GetMapping
    public ResponseResult<?> getCarousels(){
        return mailPageService.getCarousels();
    }

    @GetMapping("/getData")
    public ResponseResult<?> getData(){
        return mailPageService.getData();
    }


}
